#define BUF_SIZE 255

/******************************************************************************/
/**                              Data Structures                             **/
/******************************************************************************/

typedef struct t_input{
    int dim;
    char ** chains;
}t_input;

typedef struct t_vector{
    int dim;
    int * vec;
}t_vector;

typedef struct t_matrix{
    int fils;
    int cols;
    t_vector ** data;
}t_matrix;

typedef struct t_table{
    char * alphabet; //null terminated string, where each char is an alphabet's symbol
    int states;
    int iniState;
    t_vector finalStates;
    t_matrix transitions;
    t_input input;
}t_table;


/******************************************************************************/
/**                              Prototypes                                  **/
/******************************************************************************/

t_matrix buildMatrix(int fil, int col);
void printMatrix(t_matrix mat);
t_table parseFile(FILE * f);
int getSymIndex(char * alphabet, char symbol);
void addTransition(t_matrix * m, int from_state, int symbol_index, int to_state);
int getline(char * line, int max, FILE * f);
void error(int critical, char * msg);
